package org.etherframework.tests.features.mediator.mediators
{
	import org.etherframework.mediator.Mediator;
	
	public class LifecycledMediator extends Mediator
	{
		public static const PERSISTED:String = "persisted";
		public static const INITIATE:String = "initiate";
		public static const COMPLETE:String = "complete";
		
		public var lifecycleOrder:Vector.<String> = new Vector.<String>();
		
		public function LifecycledMediator()
		{
			super();
		}
		
		override public function initiate():void
		{
			lifecycleOrder.push(INITIATE);
		}
		
		override public function complete():void
		{
			lifecycleOrder.push(COMPLETE);
		}
		
		override public function persisted():void
		{
			lifecycleOrder.push(PERSISTED);
		}
	}
}